package com.lesson1.single;

/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2020/8/27 8:41
 */
public class SingleResponse2
{
    public static void main(String[] args)
    {
        RoadVehicle roadVehicle = new RoadVehicle();
        roadVehicle.run("摩托车");
        roadVehicle.run("汽车");
        AirVehicle airVehicle = new AirVehicle();
        airVehicle.run("飞机");
    }
}

//交通工具类
class RoadVehicle{
    public void run(String vehicle){
        System.out.println(vehicle+" 在路上运行。。。");
    }
}

//交通工具类
class AirVehicle{
    public void run(String vehicle){
        System.out.println(vehicle+" 在天上运行。。。");
    }
}